<?php
namespace Modules\ShopApi\Http\Controllers\v1;
use Illuminate\Http\Request;
use Modules\ShopApi\Http\Requests\IDMustBePositiveIntRequest;
use Modules\ShopApi\Models\Picture as PictureModel;
use Modules\ShopApi\Models\ShopProductType as ShopProductTypeModel;
class ProductTypeController extends CommonController
{
	/**
	 * @name  分类轮播图
	 * @method  GET	
	 * @return  JSON	
	 */
    public function product_type_banner_list(Request $request)
    { 
        return (new PictureModel())->baner_list(3);
    }
	/**
	 * @name  商品一级分类
	 * @method  GET	
	 * @return  JSON	
	 */
    public function product_type_one(Request $request)
    { 
        return (new ShopProductTypeModel())->product_type_one();
    }
	/**
	 * @name  商品二级三级分类
	 * @param id 一级分类id   
	 * @method  GET	
	 * @return  JSON	
	 */
    public function product_type_two(IDMustBePositiveIntRequest $request)
    { 
        return (new ShopProductTypeModel())->product_type_two($request->input('id'));
    }
}
